<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>17-内容文本操作</title>
    <script src="https://code.jquery.com/jquery-3.6.0.min.js"></script>
</head>
<body>
    <div>
        <span>我是内容</span>
    </div>
    <div id="jay"></div>
    <div id="eason"></div>
    <input type="text" value="请输入内容" name="" id="">
    <script>
        // 1. 读操作
        console.log($('div').html());
        console.log($('div').text());

        // 2. 赋值
        $('#jay').html('<strong>富士山下</strong>');  
        // 富士山下
        $('#eason').text('<strong>富士山下</strong>');
        // <strong>富士山下</strong>

        // 3. 表单值得读写
        let value = $('input').val();
        console.log(value);
        $('input').val('k歌之王');
    </script>
</body>
</html>